<style lang="less" rel="stylesheet/less" type="text/less">
     .detail-box{
         padding-left: 50px;
         padding-top: 20px;
     }
</style>
<template>
	<div class="detail-box">
		<!-- <div>{{ detailData.detailData }}</div> -->
		<div v-html="detailData"/>
	</div>
</template>
<script>
export default {
	data() {
		return {
			detailData: '',
			name: '',
		};
	},
	created() {
		this.name = this.$route.params.name;


		this.detailQuery(this.name);
	},
	methods: {
		detailQuery(name) {
          	this.axios.get(`${window.location.origin}/admin/api/v1/doc/detail?group=face&name=${name}`)
				.then(({ data }) => {
					if (data.code === 200) {
						this.detailData = data.detail[0].detail;
					}
					else {
						throw new Error(data.error);
					}
				})
		            .catch((err) => {
					this.$Message.error({
						content: err.message || err.statusText,
						duration: 5,
						closable: true,
					});
				});
		},
	},
};
</script>
